/**
 * 
 */
package com.effectivsocial.core.jsf.extension;

import javax.faces.FacesException;
import javax.faces.context.ExternalContext;
import javax.faces.context.ExternalContextFactory;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * @author Dhrubo
 *
 */
public class SimpleExternalContextFactory extends ExternalContextFactory {
	@SuppressWarnings("unused")
	private static final Logger logger = LoggerFactory.getLogger(SimpleExternalContextFactory.class);
	private ExternalContextFactory parent;

    public SimpleExternalContextFactory (ExternalContextFactory parent) {
        super();
        this.parent = parent;
    }

    @Override
    public ExternalContext getExternalContext(Object context, Object request, Object response) throws FacesException {
    	
        return new SimpleExternalContext(getWrapped().getExternalContext(context, request, response));
    }

    @Override
    public ExternalContextFactory getWrapped() {
        return parent;
    }

    
}
